home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / OWLSRC.PAK / OWLMAIN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.1 KB  |  36 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.10  $
  6. //
  7. // Default OwlMain to satisfy LibMain in DLLs that aren't components
  8. //----------------------------------------------------------------------------
  9. #include <owl/pch.h>
  10. #if !defined(OWL_DEFS_H)
  11. # include <owl/defs.h>
  12. #endif
  13.  
  14. OWL_DIAGINFO;
  15.  
  16. int
  17. OwlMain(int argc, char* argv[])
  18. {
  19.   // This OwlMain should be called only when the user builds a DLL.
  20.   // If it's called from an EXE, that means the user did not provide
  21.   // an OwlMain with the proper prototype.  Issue a warning.
  22.   //
  23.   // When LibMain/DllEntryPoint calls this OwlMain, both arguments
  24.   // are 0.  If either argument is non-zero, an EXE is running.
  25.   //
  26.   PRECONDITION(argc == 0);
  27.   PRECONDITION(argv == 0);
  28.  
  29.   if (argc != 0 && argv != 0) {
  30.     ::MessageBox(0, "You have accidently used the dummy version of OwlMain.",
  31.                 "Error", MB_ICONHAND | MB_OK);
  32.   }
  33.  
  34.   return 0;
  35. }
  36.